<%@page import="com.util.SuperString"%><%@page import="com.util.DESUtil"%><%@page import="com.mtbu.bean.SysUser"%><%@page import="com.mtbu.comm.Util"%><%@page import="com.util.SuperPage"%><%@ include file="sys_commnocache.jsp" %>
<%
	String fromcode = SuperString.notNullTrim(request.getParameter("fromcode"));
	String str_fromcode = DESUtil.decodeString(fromcode,SuperString.notNullTrim(Util.getProperties("OUTER_LINK_DES_KEY")));
	String[] arr_fromcode = str_fromcode.split("#");
	String menu_id = "";
	if(arr_fromcode!=null && arr_fromcode.length>=3){
		SysUser cur_user =(SysUser) session.getAttribute("sys.user");
		if(cur_user==null){
			cur_user = new SysUser();
			cur_user.setUserName(arr_fromcode[0]);
			session.setAttribute("sys.user",cur_user);			
		}
		menu_id = SuperString.notNullTrim(Util.getProperties("OUTER_LINK_MID_"+arr_fromcode[2]));
		((SysUser) session.getAttribute("sys.user")).getFuncmap().put(menu_id,arr_fromcode[1]);
	}
    SysUser Constant_User =(SysUser) session.getAttribute("sys.user");
    if(Constant_User == null) {
        response.sendRedirect("sys_login.jsp?url="+
                Util.encodeUrl(Util.encodeUrl(request.getRequestURI()+
                        SuperPage.getQueryQ(request,""))));
        return;
    }
    String Constant_AdminName = Util.getProperties("CONST_ADMINS");
    if(Constant_AdminName == null) Constant_AdminName = "";
    String Constant_UserName = Constant_User.getUserName();
    boolean Constant_isAdmin = Constant_AdminName.indexOf("[" + Constant_UserName + "]") >= 0;
    boolean Constant_isSuperAdmin = Constant_isAdmin && Constant_UserName.startsWith("admin");
    long sBeginTime = System.currentTimeMillis();
    if(!fromcode.equals("")){
    	response.sendRedirect(request.getRequestURI()+"?mid="+Util.encodeUrl(DESUtil.encodeString(menu_id,Util.getProperties("CONST_DES_KEY")))+SuperPage.getQueryAnd(request,"fromcode"));
    }
%>